package com.augurit.common.system.web.org.form;

import java.util.Date;
import java.util.List;

import com.augurit.common.base.form.BaseForm;

/**
 * 机构部门Form类
 * 
 */
public class OmOrgForm extends BaseForm {

	public static final String labelSuffix = "Label";
	
	/**
	 * 将OmOrgForm类转换中文属性名称转换为OmOrgForm实际值属性名称
	 * @param labelPropertyName
	 * @return
	 */
	public static String convertToValuePropertyName(String labelPropertyName){
		if(labelPropertyName != null && labelPropertyName.trim().length() > 0){
			return labelPropertyName.replace(labelSuffix, "");
		}else
			return "";
	}
	
	// 属性
	private Long orgId;			//主键ID
	private String orgCode;		//机构编号
	private String orgName;		//机构名称
	private String orgType;		//机构类型
	private Integer orgLevel;	//机构层次
	private String orgGrade;	//机构等级
	private Long parentOrgId;	//父机构ID
	private String orgSeq;		//机构序列
	private String orgAddr;		//机构地址
	private String zipCode;		//邮政编码
	private Long directorPosId;	//机构主管岗位ID
	private Long directorUserId;//机构主管人员ID
	private String linkMan;		//联系人
	private String linkTel;		//联系电话
	private String email;		//电子邮箱
	private String webUrl;		//网站地址
	private String status;		//机构状态。0为注销，1为正常
	private String area;		//所属地域
	private String creator;		//创建人
	private Date createTime;	//创建时间
	private String updator;		//修改人
	private Date updateTime;	//修改时间
	private Integer sortNo;		//排列顺序
	private String isLeaf;		//是否叶子节点。0为非叶子节点，1为叶子节点
	private Integer subCount;	//子节点数
	private String remark;		//备注
	
	// 扩展属性
	private List<OmOrgForm> children;		//子机构列表
	private List<OmPositionForm> postions;	//直属岗位列表
	private List<OmUserForm> users;			//直属用户列表
	private List<AcRoleForm> roles;			//角色列表

	private String parentOrgName;
	private String directorPosName;
	private String directorUserName;
	private String orgTypeLabel;
	private String orgGradeLabel;
	private String orgStatusLabel;
	private String orgPath;		//机构完整路径
	
	private boolean checked = false;	//为实现带checkbox的机构树而设定,表示是否有有该节点的右键菜单权限和左键单击权限
	
	
	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public Long getOrgId() {
		return orgId;
	}

	public void setOrgId(Long orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getOrgType() {
		return orgType;
	}

	public void setOrgType(String orgType) {
		this.orgType = orgType;
	}

	public Integer getOrgLevel() {
		return orgLevel;
	}

	public void setOrgLevel(Integer orgLevel) {
		this.orgLevel = orgLevel;
	}

	public String getOrgGrade() {
		return orgGrade;
	}

	public void setOrgGrade(String orgGrade) {
		this.orgGrade = orgGrade;
	}

	public Long getParentOrgId() {
		return parentOrgId;
	}

	public void setParentOrgId(Long parentOrgId) {
		this.parentOrgId = parentOrgId;
	}

	public String getOrgSeq() {
		return orgSeq;
	}

	public void setOrgSeq(String orgSeq) {
		this.orgSeq = orgSeq;
	}

	public String getOrgAddr() {
		return orgAddr;
	}

	public void setOrgAddr(String orgAddr) {
		this.orgAddr = orgAddr;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public Long getDirectorPosId() {
		return directorPosId;
	}

	public void setDirectorPosId(Long directorPosId) {
		this.directorPosId = directorPosId;
	}

	public Long getDirectorUserId() {
		return directorUserId;
	}

	public void setDirectorUserId(Long directorUserId) {
		this.directorUserId = directorUserId;
	}

	public String getLinkMan() {
		return linkMan;
	}

	public void setLinkMan(String linkMan) {
		this.linkMan = linkMan;
	}

	public String getLinkTel() {
		return linkTel;
	}

	public void setLinkTel(String linkTel) {
		this.linkTel = linkTel;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getWebUrl() {
		return webUrl;
	}

	public void setWebUrl(String webUrl) {
		this.webUrl = webUrl;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getSortNo() {
		return sortNo;
	}

	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}

	public String getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(String isLeaf) {
		this.isLeaf = isLeaf;
	}

	public Integer getSubCount() {
		return subCount;
	}

	public void setSubCount(Integer subCount) {
		this.subCount = subCount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public List<OmOrgForm> getChildren() {
		return children;
	}

	public void setChildren(List<OmOrgForm> children) {
		this.children = children;
	}

	public List<OmPositionForm> getPostions() {
		return postions;
	}

	public void setPostions(List<OmPositionForm> postions) {
		this.postions = postions;
	}

	public List<OmUserForm> getUsers() {
		return users;
	}

	public void setUsers(List<OmUserForm> users) {
		this.users = users;
	}

	public List<AcRoleForm> getRoles() {
		return roles;
	}

	public void setRoles(List<AcRoleForm> roles) {
		this.roles = roles;
	}

	public String getParentOrgName() {
		return parentOrgName;
	}

	public String getDirectorPosName() {
		return directorPosName;
	}

	public String getDirectorUserName() {
		return directorUserName;
	}

	public void setParentOrgName(String parentOrgName) {
		this.parentOrgName = parentOrgName;
	}

	public void setDirectorPosName(String directorPosName) {
		this.directorPosName = directorPosName;
	}

	public void setDirectorUserName(String directorUserName) {
		this.directorUserName = directorUserName;
	}

	public String getOrgTypeLabel() {
		return orgTypeLabel;
	}

	public String getOrgGradeLabel() {
		return orgGradeLabel;
	}

	public String getOrgStatusLabel() {
		return orgStatusLabel;
	}

	public void setOrgTypeLabel(String orgTypeLabel) {
		this.orgTypeLabel = orgTypeLabel;
	}

	public void setOrgGradeLabel(String orgGradeLabel) {
		this.orgGradeLabel = orgGradeLabel;
	}

	public void setOrgStatusLabel(String orgStatusLabel) {
		this.orgStatusLabel = orgStatusLabel;
	}

	public String getOrgPath() {
		return orgPath;
	}

	public void setOrgPath(String orgPath) {
		this.orgPath = orgPath;
	}
	
	public boolean equal(OmOrgForm other){
		return this.orgId == other.orgId;
	}
	
}